import React from 'react'
class Create extends React.Component {
    constructor(props) {
        super(props)
        // 创建阶段的生命周期函数
        const Div = document.getElementById('container')
        console.log(Div, '====constructor===')
        // Div.style.width = '200px'
        // Div.style.height = '200px'
        // Div.style.backgroundColor = 'red'
    }
    componentDidMount() {
        const Div = document.getElementById('container')
        console.log(Div, '====componentDidMount===')
        Div.style.width = '200px'
        Div.style.height = '200px'
        Div.style.backgroundColor = 'red'
    }
    render() {
        return <div id="container">
            这是一个盒子
        </div>
    }
}
export default Create